/*
 * Vector2D.h
 *
 *  Created on: 17/11/2012
 *      Author: san
 */

#ifndef VECTOR2D_H_
#define VECTOR2D_H_
#include <ostream>

class Vector2D {
friend std::ostream &operator<<(std::ostream& os, const Vector2D v);
private:
	double x, y;
public:
	Vector2D(double x, double y);
	Vector2D();
	void setX(double x);
	double getX() const;
	void setY(double y);
	double getY() const;
	void set(double x, double y);
	const Vector2D operator+(const Vector2D &other) const;
	const Vector2D operator-(const Vector2D &other) const;
	const Vector2D operator* (double scalar) const;
	double getMagnitude() const;
	virtual ~Vector2D();
};

#endif /* VECTOR2D_H_ */
